package com.zw.mes;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;

@SpringBootApplication
@MapperScan({"com.zw.mes.module.*.mapper"})
public class MesApplication extends ServletInitializer{

    public static void main(String[] args) {
        SpringApplication.run(MesApplication.class, args);
        System.out.format("%s\33[%d;%dm%s%n", "", 32, 1, "生产管理系统启动成功!");
    }
    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
        servletContext.getSessionCookieConfig().setName("mes");
        System.setProperty("org.apache.catalina.SESSION_COOKIE_NAME", "mes");
    }
}
